import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Iterator;


public class DB_UserResultSetIterator implements Iterator
{
	private ResultSet rSet;
	boolean hasNext;
	static DB_UserVerwalter db_UserVerwalter = new DB_UserVerwalter();
	
	DB_UserResultSetIterator(ResultSet pRset)
	{
		rSet = pRset;
		try 
		{
			hasNext = rSet.next();
		} 
		catch (SQLException e) 
		{
		
		}
	}
	
	public boolean hasNext() 
	{
		return hasNext;
	}

	
	public User next() 
	{
		User newUser =  new User();
		
		try 
		{
			newUser.name 		= rSet.getString(1);
			newUser.password 	= rSet.getString(2);
		} 
		catch (SQLException e) 
		{
			
		}
		return newUser;
	}

	
	public void remove() 
	{
	
		
	}

}
